<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }

    div {
      width: 300px;
      height: 300px;
      background-color: #0f0;
      margin: 30px auto;
    }

    div:nth-of-type(even) {
      background-color: #00f;
    }

    div:nth-of-type(1) {
      position: relative;
      top: 0;
      left: 0;
      transition: top 1s linear 2s;
    }

    div:nth-of-type(1):hover {
      top: 40px;
    }

    div:nth-of-type(2) {
      transition: all 1s;
    }

    div:nth-of-type(2):hover {
      width: 500px;
      height: 500px;
    }

    div:nth-of-type(3) {
      /* transition: all 2s; */
      animation: run 2s linear 0s infinite;
    }

    /* div:nth-of-type(3):hover {
      transform: rotateZ(360deg);
    } */

    @keyframes run {
      0% {
        transform: rotateZ(0deg);
      }

      100% {
        transform: rotateZ(360deg);
      }
    }

    p {
      width: 100px;
      height: 100px;
      background-color: #0f0;
      border-radius: 50%;
      animation: go 5s linear 0s infinite;
    }

    @keyframes go {
      0% {
        transform: translate(0);
        background-color: #0f0;
      }

      25% {
        transform: translateX(calc(100vw - 100px));
        background-color: #00f;
      }

      50% {
        transform: translateX(calc(100vw - 100px)) translateY(calc(100vh - 100px));
        background-color: #f00;
      }

      75% {
        transform: translateY(calc(100vh - 100px));
        background-color: #ccc;
      }

      100% {
        transform: translate(0);
        background-color: #0f0;
      }
    }
  </style>
</head>

<body>
  <!-- <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div> -->

  <p></p>
</body>

</html>